package com.esri.core.map;

import java.io.Serializable;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class AttachmentInfo implements Serializable {
    private static final long serialVersionUID = 1;
    long a;
    String b;
    long c;
    String d;

    public long getId() {
        return this.a;
    }

    public String getContentType() {
        return this.b;
    }

    public long getSize() {
        return this.c;
    }

    public String getName() {
        return this.d;
    }

    public static AttachmentInfo fromJson(JsonParser jsonParser) throws Exception {
        if (jsonParser.getCurrentToken() != JsonToken.START_OBJECT) {
            return null;
        }
        AttachmentInfo attachmentInfo = new AttachmentInfo();
        while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
            String currentName = jsonParser.getCurrentName();
            jsonParser.nextToken();
            if ("id".equals(currentName)) {
                attachmentInfo.a = jsonParser.getLongValue();
            } else if ("contentType".equals(currentName)) {
                attachmentInfo.b = jsonParser.getText();
            } else if ("size".equals(currentName)) {
                attachmentInfo.c = jsonParser.getLongValue();
            } else if ("name".equals(currentName)) {
                attachmentInfo.d = jsonParser.getText();
            } else {
                jsonParser.skipChildren();
            }
        }
        return attachmentInfo;
    }

    public String toString() {
        return "AttachmentInfo [id=" + this.a + ", contentType=" + this.b + ", size=" + this.c + ", name=" + this.d + "]";
    }
}
